﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Strive.Util.Text;
using Strive.Util.Logging;
using Strive.Core.Validations;
using Strive.Core.Service;
using Strive.Core.Translators;
using Strive.Util.Maths;
using Strive.Reflection;
using Strive.Aspects;
using Strive.DataAccess;
using OTA.Notification.Entity;


namespace OTA.Notification.Entity.Model.Message
{    /// <summary>
    ///实体类
    ///对应表名:MSG_WEB
    /// </summary>
    [Serializable]
    [Table(Name = "MSG_REPEAT_EVENT")]
    public class RepeatMsgBean
    {
        private int _id;


        private string _appcode = String.Empty;
        private string _clientseq = String.Empty;

        private string _sender = String.Empty;
        private string _senderaccount = String.Empty;
        private string _orgcode = String.Empty;
        private string _msgtype = String.Empty;
        private string _msgsendtype = String.Empty;

        private string _receiveraccount_type = String.Empty;
        private string _receiveraccount = String.Empty;

        private int _group;
        private int _priority;

        private string _level = String.Empty;
        private string _msg_template = String.Empty;

        private DateTime _start_time = new DateTime(1900, 1, 1);
        private DateTime _end_time = new DateTime(1900, 1, 1);


        private int _times;
        private int _interval;

        private DateTime _next_time = new DateTime(1900, 1, 1);
        private int _passed_times;

        private DateTime _create_time = new DateTime(1900, 1, 1);
        private DateTime _last_update_time = new DateTime(1900, 1, 1);

        private int _status;

        private string _msg_title = String.Empty;
        private string _msg_content = String.Empty;

        #region Public 成员


        [Column(Name = "MSG_REPEAT_EVENT_ID"), PK]
        public int ID
        {
            get { return _id; }
            set
            {

                _id = value;

            }
        }

        [Column(Name = "APP_CODE")]
        public string AppCode
        {
            get { return _appcode; }
            set
            {

                if (value == null) return;
                if (_appcode as object == null || !_appcode.Equals(value))
                {
                    _appcode = value;
                }
            }
        }

        [Column(Name = "CLIENT_TX_SEQ")]
        public string ClientTXSeq
        {
            get { return _clientseq; }
            set
            {

                if (value == null) return;
                if (_clientseq as object == null || !_clientseq.Equals(value))
                {
                    _clientseq = value;
                }
            }
        }

        [Column(Name = "SENDER")]
        public string Sender
        {
            get { return _sender; }
            set
            {

                if (value == null) return;
                if (_sender as object == null || !_sender.Equals(value))
                {
                    _sender = value;
                }
            }
        }

        [Column(Name = "SENDER_ACCOUNT")]
        public string SenderAccount
        {
            get { return _senderaccount; }
            set
            {

                if (value == null) return;
                if (_senderaccount as object == null || !_senderaccount.Equals(value))
                {
                    _senderaccount = value;
                }
            }
        }

        [Column(Name = "ORG_CODE")]
        public string OrgCode
        {
            get { return _orgcode; }
            set
            {

                if (value == null) return;
                if (_orgcode as object == null || !_orgcode.Equals(value))
                {
                    _orgcode = value;
                }
            }
        }
        
        [Column(Name = "MSG_TYPE")]
        public string MsgType
        {
            get { return _msgtype; }
            set
            {

                if (value == null) return;
                if (_msgtype as object == null || !_msgtype.Equals(value))
                {
                    _msgtype = value;
                }
            }
        }

        [Column(Name = "MSG_SEND_TYPE")]
        public string MsgSendType
        {
            get { return _msgsendtype; }
            set
            {

                if (value == null) return;
                if (_msgsendtype as object == null || !_msgsendtype.Equals(value))
                {
                    _msgsendtype = value;
                }
            }
        }

        [Column(Name = "RECEIVER_ACCOUNT_TYPE")]
        public string ReceiverAccountType
        {
            get { return _receiveraccount_type; }
            set
            {

                if (value == null) return;
                if (_receiveraccount_type as object == null || !_receiveraccount_type.Equals(value))
                {
                    _receiveraccount_type = value;
                }
            }
        }

        [Column(Name = "RECEIVER_ACCOUNT")]
        public string ReceiverAccount
        {
            get { return _receiveraccount; }
            set
            {

                if (value == null) return;
                if (_receiveraccount as object == null || !_receiveraccount.Equals(value))
                {
                    _receiveraccount = value;
                }
            }
        }

        [Column(Name = "GROUP")]
        public int Group
        {
            get { return _group; }
            set
            {

                _group = value;
                
            }
        }

        [Column(Name = "PRIORITY")]
        public int Priority
        {
            get { return _priority; }
            set
            {

                _priority = value;
                
            }
        }

        [Column(Name = "LEVEL")]
        public string Level
        {
            get { return _level; }
            set
            {

                if (value == null) return;
                if (_level as object == null || !_level.Equals(value))
                {
                    _level = value;
                }
            }
        }

        [Column(Name = "MSG_TEMPLATE")]
        public string MsgTemplate
        {
            get { return _msg_template; }
            set
            {

                if (value == null) return;
                if (_msg_template as object == null || !_msg_template.Equals(value))
                {
                    _msg_template = value;
                }
            }
        }

        [Column(Name = "REPEAT_START_TIME")]
        public DateTime RepeatStartTime
        {
            get { return _start_time; }
            set
            {

                _start_time = value;

            }
        }


        [Column(Name = "REPEAT_END_TIME")]
        public DateTime RepeatEndTime
        {
            get { return _end_time; }
            set
            {

                _end_time = value;

            }
        }

        [Column(Name = "REPEAT_TIMES")]
        public int RepeatTimes
        {
            get { return _times; }
            set
            {

                _times = value;
                
            }
        }

        [Column(Name = "REPEAT_INTERVAL")]
        public int RepeatInterval
        {
            get { return _interval; }
            set
            {
                _interval = value;
            }

        }


        [Column(Name = "NEXT_START_TIME")]
        public DateTime NextStartTime
        {
            get { return _next_time; }
            set
            {

                _next_time = value;

            }
        }

        [Column(Name = "PASSED_REPEAT_TIMES")]
        public int PassedRepeatTimes
        {
            get { return _passed_times; }
            set
            {
                _passed_times = value;
                
            }

        }

        [Column(Name = "CREATE_TIME")]
        public DateTime CreateTime
        {
            get { return _create_time; }
            set
            {

                _create_time = value;

            }
        }

        [Column(Name = "LAST_UPDATE_TIME")]
        public DateTime LastUpdateTime
        {
            get { return _last_update_time; }
            set
            {

                _last_update_time = value;

            }
        }

        [Column(Name = "REPEAT_EVENT_STATUS")]
        public int RepeatEventStatus
        {
            get { return _status; }
            set
            {

               _status = value;
            }

        }

        [Column(Name = "MSG_TITLE")]
        public string MsgTitle
        {
            get { return _msg_title; }
            set
            {

                if (value == null) return;
                if (_msg_title as object == null || !_msg_title.Equals(value))
                {
                    _msg_title = value;
                }
            }
        }

        [Column(Name = "MSG_CONTENT")]
        public string MsgContent
        {
            get { return _msg_content; }
            set
            {

                if (value == null) return;
                if (_msg_content as object == null || !_msg_content.Equals(value))
                {
                    _msg_content = value;
                }
            }
        }

        #endregion

    }
}
